﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProtoBuf;
using ServiceStack.DataAnnotations;
using System.ComponentModel.DataAnnotations;

namespace DataStorage
{
    [ProtoContract]
    public class StorageSync
    {
        public StorageSync() { }

        [ProtoMember(1)]
        [AutoIncrement]
        public Int32 Id { get; set; }

        //public int StaticId { get; set; }

        [ProtoMember(2)]
        public DateTime? LastSynced { get; set; }

        [ProtoMember(3)]
        public bool IsOffline { get; set; }

        [ProtoMember(4)]
        public bool IsAuthenticated { get; set; }
    }

    public class ApplicationSettings
    {
        public ApplicationSettings() { }
        
        [AutoIncrement]
        [Alias("ApplicationSettingID")]
        public Int32 Id { get; set; }
        
        [Index(Unique = true)]
        [StringLength(40)]
        public string Name { get; set; }
    }
}
